//
// Created by zhouyi on 2019/11/12.
//

#ifndef XIANGXUEVIP_CPPDEMO01_H
#define XIANGXUEVIP_CPPDEMO01_H


#include <cstdio>

class CppDemo01 {
public:
    int age;
    char *name;

    CppDemo01() {
        printf("无参构造函数 CppDemo01 \n");
    }

    ~CppDemo01() {
        printf("析构函数 ~CppDemo01\n");
    }

    CppDemo01(int age) {
        this->age = age;
    }

    CppDemo01(int age, char *name) {
        this->age = age;
        this->name = name;
    }

    CppDemo01(int age, int age2, char *name) {
        this->age = age + age2;
        this->name = name;
    }

    CppDemo01(const CppDemo01 &obj) {
        printf("拷贝构造函数函数 ~CppDemo01\n");
        this->age = obj.age;
        this->name = obj.name;
    }


    void printAge() {
        printf("年纪是 %d\n", age);
    };

    void printName() {
        printf("名字是 %s\n", name);
    };

private:


};


#endif //XIANGXUEVIP_CPPDEMO01_H
